package com.zhongfl.crm.lixiao.mapper;

import com.zhongfl.crm.enums.boss.AmibaCode;
import com.zhongfl.crm.enums.boss.WorkOrderTypeCode;
import com.zhongfl.crm.model.boss.WorkOrderType;
import com.zhongfl.crm.model.boss.WorkOrderTypeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * work_order_type
 * Created by wangkun23 on 2018/1/17.
 */
public interface WorkOrderTypeMapper {
    /**
     * 根据id查询
     */
    WorkOrderType selectById(Integer id);

    /**
     * 根据code查询
     */
    WorkOrderType selectByCode(WorkOrderTypeCode code);

    /**
     * 条件查询
     */
    List<WorkOrderType> selectSelective(WorkOrderTypeQuery workOrderTypeQuery);

    /**
     * 新增
     */
    int insertSelective(WorkOrderType record);

    /**
     * 根据id更新
     */
    int updateByIdSelective(WorkOrderType record);

    /**
     * 根据id删除
     */
    int deleteById(@Param("id") Integer id, @Param("name") String name);

    /**
     * 查询所有工单类型
     * @return
     */
    List<WorkOrderType> selectByAmibaCodes(@Param("amibaCodes") List<AmibaCode> amibaCodes);

    /**
     * 查询所有工单类型
     */
    List<WorkOrderType> selectAll();

}